package com.joysuch.wwyt.bp.enums;

import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;

/**
 * @Author jingwk
 * @Date 2021/7/14 16:04
 */
public enum ContractorTypeEnum {

    QUALIFIED(0, "合格承包商"),
    ;

    private Integer value;

    private String desc;

    ContractorTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public final Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<Integer, ContractorTypeEnum> lookup = new HashMap<>();

    static {
        for (ContractorTypeEnum e : EnumSet.allOf(ContractorTypeEnum.class)) {
            lookup.put(e.value, e);
        }
    }

    public static ContractorTypeEnum find(Integer value) {
        return lookup.get(value);
    }
}
